using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CIM.BLL.Import.bankFiveGrades;
using MWang.Data.ORM;
using MWang.Data;
namespace DLLdebuger
{
    public partial class Form2 : Form
    {
        UserShortInfo item;
        public Form2(UserShortInfo item)
        {
            InitializeComponent();
            this.item = item;
            label1.Text = item.Cname;
            label2.Text = item.Getloandate;
            label3.Text = item.Loansum.ToString();
            label4.Text = ((int)(item.MonthTerm / 12)).ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            item.Aid = textBox1.Text;
            this.Close();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            string sql = "select aid,cname from CIMuserinfo where cname like '"+item.Cname.Replace("?",string.Empty)+"%'";
            ISqlHelper db = MWang.Factory.DbFactory.CreateDbHelper("Data Source=192.168.0.10;Initial Catalog=MWDB;User ID=logicuser;Password=logicpass", false);
            dataGridView1.DataSource = db.Select(sql);
        }
    }
}